<template>
  <SysDialog :visible.sync="show" :title="title" width="1200px" atob>
    <template></template>
    <template #button>
      <el-button plain size="small">OK</el-button>
      <el-button plain size="small" @click="show = false">Cancel</el-button>
    </template>
  </SysDialog>
</template>

<script setup>
import { ref, computed, watch, onMounted } from "vue";
const emit = defineEmits(["update:visible"]);
const props = defineProps({
  visible: {
    type: Boolean,
    default: false,
  },
  isEdit: {
    type: Boolean,
    default: false,
  },
});

const title = computed(() => {
  return `${props.isEdit ? "Edit" : "New"} Map`;
});

const show = computed({
  get: () => props.visible,
  set: (val) => emit("update:visible", val),
});

watch(
  () => props.visible,
  (val) => {
    if (val) {
      //   重置form
    }
  },
);
</script>

<style scoped lang="scss">
.w200 {
  width: 200px;
}
</style>
